package com.xcx.eduservice.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.xcx.commonuntils.returnuntls.ReturnMessage;
import com.xcx.commonuntils.returnuntls.ReturnMessageUtils;
import com.xcx.eduservice.entity.aclentity.Role;

import com.xcx.eduservice.mapper.RoleMapper;

import com.xcx.eduservice.service.RoleService;

import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Primary
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    final private RoleMapper roleMapper;
    @Override
    public ReturnMessage<List<Role>> toAssignRole(String userId) {

        List<Role> rolebyUserId = roleMapper.getRolebyUserId(userId);
        return ReturnMessageUtils.success(rolebyUserId);
    }
}
